<div class="mainright">
    <form method="post" id="form_order" name="form_order">
	<h1>Quản lý người dùng</h1>
    <div class="toppage">
    	<span class="left">
            <font class="number">(<?php echo $this->user_model->get_count_all_user();?>)</font>
            <a href="javascript:;">Người dùng</a><font class="line">|</font>
            <font class="number">(<?php echo $this->user_model->get_count_all_user('yes');?>)</font>
            <a href="javascript:;"><font color="#0b9901">Kích hoạt</font></a><font class="line">|</font>
            <font class="number">(<?php echo $this->user_model->get_count_all_user('no');?>)</font>
            <a href="javascript:;"><font color="#c60001">Chưa kích hoạt</font></a>
        </span>
        <span class="right">
        	<input type="button" onclick="load_form('<?php echo base_url_admin("user/add");?>');document.getElementById('div_action').style.display='block';document.getElementById('fade').style.display='block'" value="Thêm người dùng" style="cursor: pointer;font-family:Arial; text-decoration: none;">
        </span>
    </div>
    <div class="tableout">
        <div class="title1">
            <div class="column" style="width:2%;"></div>
            <div class="column" style="width:50%;">Tên đăng nhập</div>
            <div class="column" style="width:30%;">Email</div>
            <div class="column" style="width:10%;" align="center">Trạng thái</div>
        </div>
        <?php
        foreach($all_users as $num => $user):
		$role = "Gold";
		if($user->roleid==1){
			$role = "Diamond";
		}
         ?>
	         <div class="linecate">
	        	<div class="column" sttyle="width:2%;"><input type="checkbox" name="event_id[]" id="event_id[]" value="<?php echo $user->userid?>" /></div>
	            <div class="column" style="width:50%;" onmouseover="Hovercat('<?php echo $num?>')" onmouseout="Outcat('<?php echo $num?>')">
	            	<a href="javascript:void(0)" class="menu<?php echo $num?>" onclick ="load_form('<?php echo base_url_admin("user/edit/".$user->userid);?>');document.getElementById('div_action').style.display='block';document.getElementById('fade').style.display='block'"><h2><?php echo $user->user?></h2></a><br />
	                <div class="action" id="neocat-<?php echo $num?>">
	                    <img src="<?php echo admin_img("edit.gif")?>" /><a href="javascript:void(0)" onclick ="load_form('<?php echo base_url_admin("user/edit/".$user->userid);?>');document.getElementById('div_action').style.display='block';document.getElementById('fade').style.display='block'">Sửa</a>|

                          <?php if($user->status=='no'){?>
	                      <img src="<?php echo admin_img("active.png")?>" class="png" /><a href="javascript:;" onclick="change_status('<?php echo base_url_admin("user/change_status")?>','yes',<?php echo $user->userid?>);">Kích hoạt</a>
	                      <?php }else{?>
	                      <img src="<?php echo admin_img("unactive.png")?>" class="png" /><a href="javascript:;" onclick="change_status('<?php echo base_url_admin("user/change_status")?>','no',<?php echo $user->userid?>);">Hủy kích hoạt</a>
	                     <?php }?>
	                     <img src="<?php echo admin_img("delete.gif")?>" class="png" /><a href="javascript:;" onclick="del_user('<?php echo base_url_admin("user/del/".$user->userid)?>');">Xóa</a>

	                </div>
	            </div>
	            <div class="column" style="width:30%;color:#2195C8;"><?php echo $user->mail?></div>
	            <div class="column" style="width:10%;"  align="center">
	           <?php if($user->status=='yes'){?>
	                      <a href="javascript:;" onclick="change_status('<?php echo base_url_admin("user/change_status")?>','no',<?php echo $user->userid?>);"><img src="<?php echo admin_img("active.png")?>" class="png" /></a>
	                      <?php }else{?>
	                      <a href="javascript:;" onclick="change_status('<?php echo base_url_admin("user/change_status")?>','yes',<?php echo $user->userid?>);"><img src="<?php echo admin_img("unactive.png")?>" class="png" /></a>
	            <?php }?>
	            </div>
	        </div>

         <input type="hidden" name="user[<?php echo $num?>][id]" value="<?php echo $user->userid?>" />
        <?php endforeach; echo "</div>"; //last div close ?>
        </form>
    </div>

</div>
</div><!-- end list all -->